package com.wjy.ioc.demo;

import com.wjy.ioc.annotation.Autowired;
import com.wjy.ioc.annotation.Component;
import com.wjy.transaction.Transaction;

/**
 * @author wjy
 * @date 2020/9/11
 */
@Component
public class Demo1 {

    @Autowired
    private Demo3 demo3;

    @Transaction
    public void testAOP() {
        System.out.println("testAOP");
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Demo1{");
        sb.append("demo3=").append(demo3);
        sb.append('}');
        return sb.toString();
    }
}
